<?php

  if (!$altprods = simplexml_load_file("altprods.xml")) {
    echo "Error reading file";
  }
  
  foreach($altprods as $prod) {
    echo "<p><div><img src='images/".$prod->thumb."'></div><div class='altText'>".$prod->name."<br>".$prod->stock."<br>".$prod->price."</div></p>";
  }
  
?>